package com.boang.bank;

import java.util.Scanner;

/*
@author: DELL
@date: 2024/11/29 17:27
*/
public class test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        BankAccount bankAccount = new BankAccount();
        System.out.println("请输入账户ID");
        String id=scanner.nextLine();
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("请输入要存款数");
                String mo=scanner.nextLine();
                int money = Integer.parseInt(mo);
                bankAccount.deposit(money,id);
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("请输入要取款数");
                String mo=scanner.nextLine();
                int money = Integer.parseInt(mo);
                bankAccount.save(id,money);
            }
        }).start();


    }
}
